<!-- PAGE CONTENT WRAPPER -->
<div class="page-content-wrap">

    <div class="row">
        <div style="background: #ffffff;">

            <form class="form-horizontal" name="dialogDHForm" novalidate>
                <div class="panel-default">
                    <div class="panel-heading">
                        <!--<h3 class="panel-title"><strong>编辑H5项目</strong> </h3>-->
                        <!--<ul class="panel-controls">-->
                        <!--<li><a href="javascript:void(0)" class="panel-remove"><span class="fa fa-times"></span></a></li>-->
                        <!--</ul>-->
                    </div>
                    <div class="panel-body panel-dialog">

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'图片' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="profile-image">
                                    <img style="min-height: 50px;min-width: 50px;max-width: 100px;max-height: 100px;" ng-src="{{currentLearningMapExerciseDetail.picture | faceUrl}}" ngf-select ngf-change="uploadImage($files)" ngf-pattern="'image/*'"
                                         ngf-accept="'image/*'" ngf-max-size="20MB" ngf-min-height="100" ngf-resize="{width: 1000, height: 1000}" style="cursor: pointer"/>
                                </div>
                                <span class="help-block">{{'请上传图片' | dyLanguage}}<i style="cursor: pointer; "><span ng-show="showPictureProgress">({{pictureProgress.value}}%)</span></i></span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'名称' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" name="name" ng-model="currentLearningMapExerciseDetail.name" required/>
                                </div>
                                <span class="help-block" ng-show="(dialogDHForm.name.$untouched && !dialogDHForm.$submitted) || dialogDHForm.name.$valid">{{'请输入名称' | dyLanguage}}</span>

                                <div ng-show="(dialogDHForm.name.$touched || dialogDHForm.$submitted ) && dialogDHForm.name.$invalid">
                                    <span class="error-block" ng-show="dialogDHForm.name.$error.required">{{'必输选项' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'排序' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="number" class="form-control" name="sort" ng-model="currentLearningMapExerciseDetail.sort" required/>
                                </div>
                                <span class="help-block" ng-show="(dialogDHForm.sort.$untouched && !dialogDHForm.$submitted) || dialogDHForm.sort.$valid">{{'请输入名称' | dyLanguage}}</span>

                                <div ng-show="(dialogDHForm.sort.$touched || dialogDHForm.$submitted ) && dialogDHForm.sort.$invalid">
                                    <span class="error-block" ng-show="dialogDHForm.sort.$error.required">{{'必输选项' | dyLanguage}}</span>
                                </div>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'描述' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                <textarea class="form-control" rows="5" ng-model="currentLearningMapExerciseDetail.remark"></textarea>
                                <span class="help-block">{{'请输入描述' | dyLanguage}}</span>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'内容' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12">
                                --------------------
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-md-3 col-xs-12 control-label">{{'任务列表' | dyLanguage}}</label>

                            <div class="col-md-6 col-xs-12 control-label" style="text-align: left;">
                                <div class="input-group" ng-repeat="task in currentLearningMapExerciseDetail.tasks" ng-show="!!currentLearningMapExerciseDetail.tasks">
                                    <ul>
                                        <li>{{'任务名称：' | dyLanguage}}{{task.subject}}</li>
                                        <li>{{'任务内容：' | dyLanguage}}{{task.content}}</li>
                                        <li>{{'必须完成：' | dyLanguage}}{{task.required?"是":"否"}}</li>
                                        <li>{{'人工审核：' | dyLanguage}}{{task.approve?"是":"否"}}</li>
                                        <li>{{'顺序：' | dyLanguage}}{{task.sort}}</li>
                                    </ul>
                                </div>
                                <div class="input-group" ng-show="!currentLearningMapExerciseDetail.tasks">
                                    <span style="color: red;">{{'无' | dyLanguage}}</span>
                                </div>
                                <p></p>

                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="newTask.subject" placeholder="{{'任务名称' | dyLanguage}}"/>
                                </div>
                                <p></p>

                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="text" class="form-control" ng-model="newTask.content" placeholder="{{'任务内容' | dyLanguage}}"/>
                                </div>
                                <p></p>

                                <div class="input-group" style="width: 100%">
                                    <label class="control-label">{{'是否必须完成' | dyLanguage}}</label>
                                    <label class="switch switch-small">
                                        <input ng-checked="newTask.required" ng-click="updateSelection($event, newTask.required)" type="checkbox" ng-model="newTask.required"/>
                                        <span></span>
                                    </label>
                                </div>
                                <p></p>

                                <div class="input-group" style="width: 100%">
                                    <label class="control-label">{{'是否人工审核' | dyLanguage}}</label>
                                    <label class="switch switch-small">
                                        <input ng-checked="newTask.approve" ng-click="updateSelection($event, newTask.approve)" type="checkbox" ng-model="newTask.approve"/>
                                        <span></span>
                                    </label>
                                </div>
                                <p></p>

                                <div class="input-group">
                                    <span class="input-group-addon"><span class="fa fa-pencil"></span></span>
                                    <input type="number" class="form-control" ng-model="newTask.sort" placeholder="{{'顺序' | dyLanguage}}"/>
                                </div>
                                <p></p>

                                <div class="input-group">
                                    <div class="panel-footer" style="text-align: center;">
                                        <button class="btn btn-info" ng-click="addTask()"><i class="fa fa-check"></i>{{'确定' | dyLanguage}}</button>
                                    </div>

                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="panel-footer" style="text-align: center;">
                        <button class="btn btn-danger" ng-click="cancel()"><i class="fa fa-times"></i>{{'取消' | dyLanguage}}</button>
                        <button class="btn btn-info" ng-click="saveExerciseDetail()"><i class="fa fa-check"></i>{{'保存' | dyLanguage}}</button>
                    </div>
                </div>
            </form>

        </div>
    </div>

</div>
<!-- END PAGE CONTENT WRAPPER -->